#include <stdio.h>
#include <stdbool.h>
#include <string.h>

char* gcdOfStrings(char* str1, char* str2) {
    int n1 = strlen(str1), n2 = strlen(str2);
    while (true)
        if (n1 == n2 && strncmp(str1, str2, n1) == 0) return str1;
        else if (n1 > n2 && strncmp(str1, str2, n2) == 0) str1 += n2, n1 -= n2;
        else if (n1 < n2 && strncmp(str1, str2, n1) == 0) str2 += n1, n2 -= n1;
        else                                               return "";
}

int main()
{
	return 0;
}